<!DOCTYPE html>
<html th:replace="~{ frame :: common_html(~{::title}, ~{::#content-body}, ~{::script}) }">
<title>鱼汤网用户管理系统</title>
<div id="content-body" class="layui-body" style="width: 100%;height: 100%;left: 0">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;width: 35%;margin: 0 auto">
        <form class="layui-form" th:action="@{/user/update}" method="post" th:object="${user}" style="margin-top: 50px">
            <div style="display: none">
                <input type="text" name="id" th:value="*{id}">
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-inline">
                    <input type="text" name="username" readonly lay-verify="required" autocomplete="off" class="layui-input" th:value="*{username}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">单选框</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="MALE" title="男" th:field="*{sex}">
                    <input type="radio" name="sex" value="FEMALE" title="女" th:field="*{sex}">
                    <input type="radio" name="sex" value="SECRECY" title="保密" th:field="*{sex}">
                    <input type="radio" name="sex" value="UNKNOWN" title="未知" th:field="*{sex}">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">手机号</label>
                    <div class="layui-input-inline layui-input-wrap">
                        <input type="tel" name="mobilePhone" autocomplete="off" placeholder="请填写手机号"
                               class="layui-input demo-phone" th:value="*{mobilePhone}">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-inline">
                        <input type="text" name="email" lay-verify="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input" th:value="*{email}">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn">保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary" onclick="resetPwd()">密码重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    function resetPwd() {
        layer.open({
            type: 2,
            title: '密码重置',
            area: ['700px', '400px'],
            shadeClose: true,
            content: ['/ums/user/resetPassword'],
        })
    }
</script>
</html>